package actionScripts.business
{
	import actionScripts.vo.UserDetail;
	
	import mx.rpc.IResponder;

	public class GlobalDelegates
	{
		//---------------------
		//	PRIVATE VARIABLES
		//---------------------
		private var _responder		: IResponder;
		private var _service		: Object;
		private var loginService	: SingletonService;
		
		//---------------------
		//	PUBLIC VARIABLES
		//---------------------
		public var userName			: String;
		public var password			: String;
		
		public function GlobalDelegates(responder:IResponder)
		{
			loginService = SingletonService.getInstance();
			_responder = responder;
		}
		
		public function login( arg1:String, arg2:String ) : void {
			_service   = loginService.LARemoteService;
			var call : Object = _service.logIn( arg1,arg2);
			call.addResponder( _responder );
		}
		public function checkUserNameAvailiablity( arg1:String ) : void {
			_service   = loginService.LARemoteService;
			var call : Object = _service.checkUserNameAvailiablity( arg1);
			call.addResponder( _responder );
		}
		public function registerUser( usrDetail:UserDetail ) : void {
			_service   = loginService.LARemoteService;
			var call : Object = _service.registerUser( usrDetail);
			call.addResponder( _responder );
		}
		public function forgotPassword( arg1:String ) : void {
			_service   = loginService.LARemoteService;
			var call : Object = _service.forgotPassword( arg1);
			call.addResponder( _responder );
		}
	}
}